#_*_ coding: utf-8 _*_
from pydoc import Doc

__author__ = 'galushkoss'
from django.contrib import admin
from documentation.models import Publisher, Author, Book, News, Documents, Category, Section

class PublisherAdmin(admin.ModelAdmin):
	search_fields = ('name','city')

class BookAdmin(admin.ModelAdmin):
	filter_horizontal = ('authors',)
	list_filter = ('publication_date',)
	date_hierarchy = 'publication_date'
	raw_id_fields = ('publisher',)

class DocsAdmin(admin.ModelAdmin):
	filter_horizontal = ('authors',)
	list_filter = ('post_date',)
	raw_id_fields = ('section',)

admin.site.register(Publisher,PublisherAdmin)
admin.site.register(Author)
admin.site.register(Book,BookAdmin)
admin.site.register(News)
admin.site.register(Category)
admin.site.register(Section)
admin.site.register(Documents,DocsAdmin)